package com.nenglai.common.resource;


import com.nenglai.common.crud.EditorBody;
import com.nenglai.common.crud.FormBody;
import com.nenglai.common.crud.RemoveBody;
import com.nenglai.common.crud.SearchBody;
import com.nenglai.common.response.ValidateException;
import com.nenglai.common.vo.SearchOneVO;
import com.nenglai.common.vo.SearchVO;

/**
 * 通用查询接口
 *
 * @author kongdehui
 * @date 2021/04/21 16:27
 **/
public interface ResourceService<V> {
    String resourceName();

    SearchVO search(SearchBody body);

    SearchOneVO<V> searchOne(SearchBody body);

    Boolean delete(RemoveBody body);

    Object add(FormBody body) throws ValidateException;

    Object update(FormBody body) throws ValidateException;

    Boolean edit(EditorBody body) throws ValidateException;

    Object configs();
}
